﻿<UserControl x:Class="ETRobocon.RaceTraking.GameManagement.RunnerMgmtUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:system="clr-namespace:System;assembly=mscorlib"
             xmlns:src="clr-namespace:ETRobocon.RaceTraking.GameManagement"
    Height="354" Width="404">
    <UserControl.Resources>
        <src:WSRunner x:Key="targetRunner"/>
        <src:RunnerStatusConverter x:Key="runnerStatusConverter"/>
        <ObjectDataProvider ObjectType="src:WSRunner"
                            MethodName="GetBonusResultStatus" x:Key="GetBonusResultStatus">
            <ObjectDataProvider.MethodParameters>
                <system:String>""</system:String>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <Style TargetType="Label">
            <Setter Property="Margin" Value="2,2,2,2"/>
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="Margin" Value="2,2,2,2" />
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="2,2,2,2"/>
        </Style>
        <Style TargetType="ComboBox">
            <Setter Property="Margin" Value="2,2,2,2"/>
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="2,2,2,2"/>
        </Style>
    </UserControl.Resources>
    <Border BorderThickness="2" BorderBrush="Blue">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="32"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <StackPanel.DataContext>
                <Binding Source="{StaticResource targetRunner}"/>
            </StackPanel.DataContext>
            <TextBlock>
                <TextBlock.Text>
                    <Binding  Path="Course"/>
                </TextBlock.Text>
            </TextBlock>
            <Label Content=" : "/>
            <TextBlock Text="{Binding Path=TeamBib}"/>
            <Label Content=" : "/>
            <TextBlock Text="{Binding Path=TeamName}"/>
        </StackPanel>
        <DockPanel Grid.Row="1">
            <DockPanel.DataContext>
                <Binding Source="{StaticResource targetRunner}"/>
            </DockPanel.DataContext>
            <Label Content="Run Time:"/>
            <TextBox Name="textBoxRunTime" Width="100" TextChanged="textBoxRunTime_TextChanged">
                <TextBox.Text>
                    <Binding Path="RunTime" Mode="TwoWay"></Binding>
                </TextBox.Text>
            </TextBox>
            <ComboBox Name="comboBoxRunnerStatus" Width="80" SelectionChanged="comboBoxRunnerStatus_SelectionChanged">
                <ComboBox.SelectedIndex>
                    <Binding Path="Status" Mode="TwoWay" Converter="{StaticResource runnerStatusConverter}"/>
                </ComboBox.SelectedIndex>
                <ComboBoxItem>Ready</ComboBoxItem>
                <ComboBoxItem>Running</ComboBoxItem>
                <ComboBoxItem>Completed</ComboBoxItem>
                <ComboBoxItem>Retired</ComboBoxItem>
                <ComboBoxItem>Obstructed</ComboBoxItem>
                    <ComboBoxItem Content="Declined" />
                </ComboBox>
                <Button Name="buttonGoal" Click="buttonGoal_Click" HorizontalAlignment="Right">Goal/Stop</Button>
                <Button Name="buttonPost" Click="buttonPost_Click" HorizontalAlignment="Right" Visibility="Hidden">Post</Button>
        </DockPanel>
        <Rectangle Name="rectangleCourse" Grid.Row="2" Width="390" Height="268" Margin="5,5,5,5">
        </Rectangle>
        <Canvas Name="canvasCourse" Grid.Row="2" Width="390" Height="268" Margin="5,5,5,5" Opacity="0.5">
            
        </Canvas>
            <Grid Grid.Row="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <src:CheckMarkMgmtControl x:Name="CheckMark0" DisplayName="CheckMark0" IsEnabled="False" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark1" DisplayName="CheckMark1" IsEnabled="False" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark2" DisplayName="CheckMark2" IsEnabled="False" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark3" DisplayName="CheckMark3" IsEnabled="False" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark4" DisplayName="CheckMark4" IsEnabled="False" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark5" DisplayName="CheckMark5" IsEnabled="False" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark6" DisplayName="CheckMark6" IsEnabled="False" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark7" DisplayName="CheckMark7" IsEnabled="False" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark8" DisplayName="CheckMark8" IsEnabled="False" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <src:CheckMarkMgmtControl x:Name="CheckMark9" DisplayName="CheckMark9" IsEnabled="False" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" />
                <ComboBox Name="ComboBoxDifficultPoints" Grid.Column="1" Grid.Row="0" Visibility="Visible">
                    <ComboBoxItem >Pattern No</ComboBoxItem>
                    <ComboBoxItem>Course-A</ComboBoxItem>
                    <ComboBoxItem>Course-B</ComboBoxItem>
                </ComboBox>
            </Grid>
        </Grid>
    </Border>
</UserControl>
